package routers

import (
	"gin-project-01/gin-step04/gin14-gorm-base/controllers/cookie"
	"gin-project-01/gin-step04/gin14-gorm-base/middlewares"
	"github.com/gin-gonic/gin"
)

func CookieRouters(r *gin.Engine) {
	//路由分组中间件使用方式一
	routers := r.Group("/cookie", middlewares.SaveAccessLog)

	{

		//设置cookie
		routers.GET("/add", cookie.CookieController{}.CookieAdd)

		//获取cookie
		routers.GET("/get", cookie.CookieController{}.CookieGet)

		//删除cookie
		routers.GET("/del", cookie.CookieController{}.CookieDel)

	}
}
